%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% File:               set_design_mat.m
%
% Authors:            Miguel R. Rueda and Sergio Ascencio.
%
% Description:        It creates design matrix.
% Language:           MATLAB R2013b (8.2.0.701) 64 Bit
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [Y,X,CLv]=set_design_mat(d_s,vary,varsx,varcl)

X=[double(d_s,varsx)];
CLv=double(d_s,varcl);
Y=double(d_s,vary);

%Eliminating NaN
nan=sum(isnan([Y X]),2)~=0;
Y(nan,:)=[]; X(nan,:)=[]; CLv(nan,:)=[];

end




